package com.wanxi.method;

import java.util.Scanner;

public class JudgeJiOu {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入一个自然数");
        int num = scanner.nextInt();
        judge(num);
    }

    /**
     * 根据参数num判断奇偶数
     * @param num
     */
    public static void judge(int num) {
        if (num % 2 == 0) {
            System.out.println("这个数是偶数");
        } else {
            System.out.println("这个数是奇数");
        }
    }
}
